package com.kclm.xsap.entity;

import com.baomidou.mybatisplus.annotation.*;

import java.math.BigDecimal;
import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName("t_member_bind_record")
@Accessors(chain = true)
public class MemberBindRecordEntity implements Serializable {
	private static final long serialVersionUID = 1L;

	@TableId
	private Long id;

	private Long memberId;

	@NotNull(message = "请选择会员卡！")
	private Long cardId;

	@NotNull(message = "请输入要充值的次数")
	private Integer validCount;

	@NotNull(message = "请填入有效期")
	private Integer validDay;

	@NotNull(message = "请输入实收金额")
	private BigDecimal receivedMoney;

	@NotBlank(message = "请选择支付方式")
	private String payMode;

	private String note;

	private Integer activeStatus;

	@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
	@TableField(fill = FieldFill.INSERT)
	private LocalDateTime createTime;

	@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
	@TableField(fill = FieldFill.INSERT_UPDATE)
	private LocalDateTime lastModifyTime;

	@Version
	private Integer version = 1;

}
